﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Hotnet.Entity;
using Hotnet.Dal.BaseRepository;

namespace Hotnet.Dal.NSDalPicture
{
	public class DalPictureGroupXTag : Repository<PictureGroupXTag>
	{
		public void Update(PictureGroupXTag model)
		{
			//IQueryable<Star> originalModel = givenTable.Where(x => );
			//givenTable.UpdateBatch(originalModel, x => );
			this.Update(model);
		}

		public Tag[] ListTagByGroupID(int groupID)
		{
			var query = from xtag in disableCacheDataContext.PictureGroupXTag
						where xtag.GroupID==groupID
						join tag in disableCacheDataContext.Tag
							on xtag.TagID equals tag.TagID
						select tag;
			return query.ToArray();
		}
	}
}
